package com.changil.admin.protocol;

import com.changil.admin.dto.ArticleList;
import com.changil.admin.dto.BooleanBean;
import com.changil.admin.dto.InsertedId;

public class ArticleManager {
	private static ArticleManager sInstance = null;


	public static ArticleManager getsInstance() {
		if (sInstance == null) {
			synchronized (ArticleManager.class) { 
				if (sInstance == null) { 
					sInstance = new ArticleManager();
				}
			}
		}
		return sInstance;
	}
	
	public ArticleList getArticleList(int boardId, int fromId, int count, boolean isDownSide) {
		return ApiManager.getsInstance().getArticleList(boardId, fromId, count, isDownSide);
	}
	
	public InsertedId writeArticle(int boardId, String title, String content) {
		return ApiManager.getsInstance().writeArticle(boardId, title, content);
	}
	
	public BooleanBean modifyArticle(int id, String title, String content) {
		return ApiManager.getsInstance().modifyArticle(id, title, content);
	}
	
	public BooleanBean deleteArticle(int articleId) {
		return ApiManager.getsInstance().deleteArticle(articleId);
	}
}
